package com.ruoyi.teaching.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.teaching.domain.PlatformFFeedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.teaching.domain.vo.FeedbackDetailVO;
import com.ruoyi.teaching.domain.vo.FeedbackFrontDownSortVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 王旭
 * @since 2025-02-12
 */
@Mapper
public interface PlatformFFeedbackMapper extends BaseMapper<PlatformFFeedback> {

    Page<PlatformFFeedback> selectPageFrontUp(Page<PlatformFFeedback> platformFFeedbackPage,@Param("feedbackStatus") Integer feedbackStatus);

    Page<FeedbackFrontDownSortVO> selectFeedbackWithReplyCount(
            Page<FeedbackFrontDownSortVO> page,
            @Param("ew") QueryWrapper<PlatformFFeedback> queryWrapper, @Param("title") String title, @Param("feedbackStatus") Integer feedbackStatus);

    FeedbackDetailVO selectDetailById(Long objectId);

    Page<FeedbackDetailVO> selectMyFeedback(Page<FeedbackDetailVO> feedbackDetailVOPage, @Param("title") String title, @Param("feedbackStatus") Integer feedbackStatus, @Param("feedbackType") Long feedbackType, @Param("startDate") LocalDateTime startDate, @Param("userId") Long userId);
}
